package com.chenguo.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class AsyncService {

    @Async//告诉Spring 这是一个异步的方法
    public void  hello(){

        try {
            Thread.sleep(3000);
        }catch (InterruptedException e){
            e.printStackTrace();
        }
        System.out.println("数据正出理。。。。。。。" +
                "");
    }
}
